package com.smm.gui;

import java.awt.Color;
import java.awt.Font;
import java.awt.Toolkit;

import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JProgressBar;
import javax.swing.JScrollPane;
import javax.swing.JTabbedPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.JTree;
import javax.swing.border.LineBorder;

import com.smm.model.FileInfoVO;
import javax.swing.JTable;
import javax.swing.JTextPane;
import javax.swing.ScrollPaneConstants;
import javax.swing.DropMode;

public class Screen extends JFrame {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	public JTextField textField;
	public FileInfoVO model = new FileInfoVO();
	public JButton btnAdd;
	public JTree tree;
	public JTextField textField_1;
	public JLabel lblStatusReady;
	public JButton btnSearch;
	public JTextPane txtpnhello;
	public JProgressBar progressBar;

	/**
	 * Create the frame.
	 */
	@SuppressWarnings({ "unchecked", "rawtypes" })
	public Screen() {
		getContentPane().setBackground(Color.DARK_GRAY);
		setTitle("Simple Movie Manager V1.1");
		setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("/com/smm/resource/icon.png")));
		setResizable(false);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 867, 606);
		getContentPane().setLayout(null);

		JPanel panel_1 = new JPanel();
		panel_1.setBounds(230, 0, 661, 578);
		panel_1.setBackground(Color.DARK_GRAY);
		getContentPane().add(panel_1);
		panel_1.setLayout(null);

		 progressBar = new JProgressBar();
		progressBar.setBounds(360, 553, 262, 23);
		panel_1.add(progressBar);

		lblStatusReady = new JLabel("Status : Ready");
		lblStatusReady.setForeground(Color.LIGHT_GRAY);
		lblStatusReady.setBounds(12, 555, 236, 14);
		panel_1.add(lblStatusReady);

		JLabel lblPrgoress = new JLabel("Prgoress");
		lblPrgoress.setForeground(Color.LIGHT_GRAY);
		lblPrgoress.setBounds(300, 555, 50, 14);
		panel_1.add(lblPrgoress);

		JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		tabbedPane.setBounds(10, 11, 612, 538);
		panel_1.add(tabbedPane);

		JPanel panel = new JPanel();
		panel.setBackground(Color.DARK_GRAY);
		tabbedPane.addTab("My Collection", null, panel, null);
		panel.setLayout(null);

		JLabel lblPath = new JLabel("Path");
		lblPath.setBounds(20, 15, 46, 14);
		panel.add(lblPath);
		lblPath.setForeground(Color.WHITE);

		textField = new JTextField();
		textField.setBounds(56, 11, 391, 23);
		panel.add(textField);
		textField.setColumns(10);

		btnAdd = new JButton("Sync Folder");
		btnAdd.setBounds(457, 11, 127, 23);
		panel.add(btnAdd);
		
		JScrollPane scrollPane_1 = new JScrollPane();
		scrollPane_1.setBounds(-1, 40, 612, 472);
		panel.add(scrollPane_1);
		
	    txtpnhello = new JTextPane();
		txtpnhello.setEditable(false);
		txtpnhello.setBackground(Color.DARK_GRAY);
		txtpnhello.setContentType("text/html");
		txtpnhello.setText("<p color ='white'> <ul color ='white'> <li>Use the \"sync folder\" button to pick your movie folder</li> <li> Click the file name in the left pane to get related information.</li> </ul> </p>");
		scrollPane_1.setViewportView(txtpnhello);

		JPanel panel_2 = new JPanel();
		panel_2.setBackground(Color.DARK_GRAY);
		tabbedPane.addTab("Search", null, panel_2, null);
		panel_2.setLayout(null);

		JLabel lblSearch = new JLabel("Search");
		lblSearch.setBounds(20, 14, 46, 14);
		panel_2.add(lblSearch);
		lblSearch.setForeground(Color.WHITE);

		textField_1 = new JTextField();
		textField_1.setBounds(58, 10, 245, 23);
		panel_2.add(textField_1);
		textField_1.setColumns(10);

		JLabel lblBy = new JLabel("By Category");
		lblBy.setBounds(314, 14, 66, 14);
		panel_2.add(lblBy);
		lblBy.setForeground(Color.WHITE);

		JComboBox comboBox = new JComboBox();
		comboBox.setBounds(390, 10, 106, 23);
		panel_2.add(comboBox);
		comboBox.setModel(new DefaultComboBoxModel(new String[] { "Genre",
				"Rating", "Title", "Actor" }));

	    btnSearch = new JButton("Search");
		btnSearch.setBounds(506, 11, 89, 23);
		panel_2.add(btnSearch);

		JScrollPane scrollPane = new JScrollPane();
		scrollPane.setBounds(0, 0, 231, 578);
		getContentPane().add(scrollPane);

		tree = new JTree();
		tree.setBorder(new LineBorder(Color.WHITE, 2, true));
		tree.setForeground(new Color(255, 255, 255));
		tree.setBackground(Color.LIGHT_GRAY);
		scrollPane.setViewportView(tree);
	}
}
